/* eslint-disable @typescript-eslint/no-explicit-any */
//引入所有组件
import type { App, Component } from 'vue'
import SvgIcon from '@/components/SvgIcon/index.vue'
import Pagination from '@/components/Pagination/index.vue'
//全局的组件对象
const allGlobalComponents: { [name: string]: Component } = {
  SvgIcon,
  Pagination,
}

//对外暴露插件对象
export default {
  install(app: App) {
    Object.keys(allGlobalComponents).forEach((key: string) => {
      app.component(key, allGlobalComponents[key])
    })
  },
}
